Draws the particles of a particle system in the colors of a palette instead of its sprites’ own colors, from now on: every burst and every running copy of that system, whoever started it. effect_palette(sys, nothing) puts the sprites’ own colors back.
Works differently on Game Boy - The Game Boy has 4 shades of grey, and the picture shares one palette of them with the letters; sprites have two palettes of 3 shades and clear, so an effect takes one of the two sprite palettes.
Works differently on Game Boy Color - The Game Boy Color has 8 palettes for sprites and 8 for the picture, each with 4 colors, so an effect takes one of the sprite palettes.
On other consoles this differs: see Side by side and How the consoles differ.
effect_palette(sys, palette)| Name | Type |
|---|---|
sys | effect |
palette | palette |
Nothing.
Draws the particles of the effect sys in the colors of a palette instead of its sprites' own colors, from now on: every burst and every running copy of that effect, whoever started it. Particles already in the air change colors at once. effect_palette(sys, nothing) puts the sprites' own colors back.
It is a setting of the effect, not of the instance that started it, so two instances that start the same effect see the same colors. Use two effects for two looks.
The palette has to have 16 colors. Every different palette showing at once uses one of the console's 16 sprite palettes, shared with everything else in that palette. The game remembers the palette of as many effects as it can run at once (6, unless you changed that in Project Settings under Engine limits); give it to one more and a development build stops. If no sprite palette is free, a development build stops and says so, and a release build draws those particles in their own colors. A room change does not undo it.
effect_palette(fx_doc_spark, pal_doc_gold);
effect_burst(fx_doc_spark, x, y);A burst of gold sparks. The next burst of the same effect is gold too, until you change it.
The palette has to have 16 colors. Particles already in the air change colors at once; new ones are born in the new colors. It is a setting of the system, not of the instance that started it, so two instances that start the same system see the same colors: use two systems for two looks. Every different palette showing at once uses one of the console’s 16 sprite palettes, shared with everything else in that palette. If none is free a development build stops with a message that says so, and a release build draws those particles in their own colors. The game remembers the palette of as many effects as it can run at once (6, unless you changed that in Project Settings under Engine limits); one more stops a development build and is ignored in a release build. It lasts until you change it, a room change does not undo it.